As Internet technologies develop quickly and material and spiritual cultures of people become richer, there are more requirements for video applications on the Internet, and in particular, requirements for high-definition video applications. However, a data volume of a high-definition video is huge, and a problem of compression coding of the high-definition video must be first resolved, so that the high-definition video can be transmitted on the bandwidth-limited Internet. Currently, there are two international organizations dedicated to developing international video coding standards, namely, the Motion Picture Experts Group (MPEG) in the International Organization for Standardization (ISO)/International Electrotechnical Commission (IEC), and the Video Coding Experts Group (VCEG) in the International Telecommunication Union—Telecommunication Standardization Sector (ITU-T). Established in 1986, the MPEG is dedicated to developing related standards in the multimedia field, and the standards are mainly applied to storage, broadcast and television, streaming media on the Internet or a wireless network, and the like. The ITU-T mainly develops video coding standards in the real-time video communications field, such as videophone and videoconferencing applications.
In the past decades, international video coding standards oriented to various applications were successfully developed, mainly including the MPEG-1 standard applied to a video compact disc (VCD), the MPEG-2 standard applied to a Digital Video Disc (DVD) and digital video broadcasting (DVB), the H.261 standard, H.263 standard, and H.264 standard applied to videoconferencing, the MPEG-4 standard allowing coding of an object in any form, and the latest high efficiency video coding (HEVC) standard.
Because a strong time correlation exists between adjacent pictures in a picture sequence, each picture in the picture sequence may be divided into several non-overlapping coding blocks, and it is considered that motions of all pixels in a coding block are the same. Motion vectors are allocated in units of coding blocks. When inter-picture prediction is performed on a current coding block in a current coding picture, a reconstructed coding picture is used as a reference picture. With respect to the current coding block, a motion search is performed in a search region in the reference picture to find a block that satisfies a match rule with the current coding block, and this block is a match block. A relative offset between a spatial position of the current coding block and that of the match block in the reference picture is a motion vector (MV). A process of obtaining the motion vector is referred to as motion estimation (ME). When compression coding is performed on a video, reference picture information, motion vector information, and a difference (residual value) between a reconstructed pixel value of the match block and an original pixel value of the current block are encoded and then sent to a decoder. The decoder finds, in the decoded reference picture, a block in a position to which the motion vector points, and adds the residual value to restore the current block. Motion estimation may be used to remove inter-picture redundancy in the video sequence, so that a quantity of bits in video transmission is greatly reduced.
Due to object motion continuity, not all motion vectors of blocks between adjacent pictures use integer pixels as basic units. Real motion displacement may be in units of sub-pixels such as a ¼ pixel or even a ⅛ pixel. Both H.264 and HEVC use fixed ¼ pixel motion vector precision for luminance and ⅛ pixel motion vector precision for chrominance. In comparison with integer pixel motion vector precision, this greatly improves coding performance. When sub-pixel motion vector precision is used, correspondingly, in a given search range in the reference picture, a search step size in the process of searching for the match block of the current block is of also sub-pixel motion vector precision. In addition, during coding of all video pictures in a video sequence, a search step size used in a reference picture for a current block of each video picture uses fixed sub-pixel motion vector precision.
However, the inventors of this application find that for a video sequence with different content features, use of fixed motion vector precision is unfavorable to coding of the video sequence.